package org.xs.web.http.provider;

public class HTTPCookie {
	public  String name,value,domain,path;
	public  Integer maxArg,version;
	public  boolean secure;
	public HTTPCookie(String name,String value,String domain,String path,Integer maxArg,Integer version,boolean secure){
		this.name = name; 	  this.value = value;
		this.domain = domain; this.path = path;
		this.maxArg = maxArg; this.version = version;
		this.secure = secure;
	}
	@Override
	public HTTPCookie clone(){
		return new HTTPCookie(name, value, domain, path, maxArg, version, secure);
	}
	
	public HTTPCookie setDomain(String domain) {
		return new HTTPCookie(domain, domain, domain, domain, maxArg, version, secure);
	}
	public HTTPCookie setPath(String path) {
		return new HTTPCookie(name, value, domain, path, maxArg, version, secure);
	}
	public HTTPCookie setMaxArg(Integer maxArg) {
		return new HTTPCookie(name, value, domain, path, maxArg, version, secure);
	}
	public HTTPCookie setVersion(Integer version) {
		return new HTTPCookie(name, value, domain, path, maxArg, version, secure);
	}
	public HTTPCookie setSecure(boolean secure) {
		return new HTTPCookie(name, value, domain, path, maxArg, version, secure);
	}
	public HTTPCookie setValue(String value){
		return new HTTPCookie(name, value, domain, path, maxArg, version, secure);
	}
	
	
}
